package com.ftg.learn.mall.service.impl;

import com.ftg.learn.mall.entity.PmsBrand;
import com.ftg.learn.mall.mapper.PmsBrandMapper;
import com.ftg.learn.mall.service.IPmsBrandService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 品牌表 服务实现类
 * </p>
 *
 * @author mallCommon
 * @since 2022-04-19
 */
@Service
public class PmsBrandServiceImpl extends ServiceImpl<PmsBrandMapper, PmsBrand> implements IPmsBrandService {
   @Resource
    PmsBrandMapper pmsBrandMapper;

    /**
     * 修改显示状态

     * @return
     */

   @Override
    public int updateBrandStatus(List<Long> ids ,Long showStatus){
       int count=0;
      for (Long id:ids){
          pmsBrandMapper.updateBrandStatus(id,showStatus);
         count++;
      }

     return count;

   }}



